<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>29题修改switch</title>
    <style>
        div {
            width: 100%;
            
        }
        span {
            display: block;
            width: 100%;
        }
    </style>
    <script>
        function getName() {
            var str = prompt('请输入一串字符串');
            if (str === 'jt') {
                alert('金团网');
            } else if (str === 'ejt') {
                alert('金团相相贷');
            } else if (str === 'ejin') {
                alert('网上综合金融体验馆');
            } else {
                alert('金团网络典当');
            }
        }
    </script>
</head>
<body>
    <div>
        点击按钮开始输入一串字符串<input type="button" value="点击输入" onclick="getName()">
    </div>
</body>
</html>